﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Crystalbyte.Equinox.Imap;
using Windows.Storage;
using System.Collections.ObjectModel;

namespace Application4
{
    public class Setting
    {
        public string Username
        {
            get
            {
                ApplicationDataContainer roaming = ApplicationData.Current.LocalSettings;
                return (string)roaming.Values["Username"];
            }
            set
            {
                ApplicationDataContainer roaming = ApplicationData.Current.LocalSettings;
                roaming.Values["Username"] = value;
            }
        }
        public string Password
        {
            get
            {
                ApplicationDataContainer roaming = ApplicationData.Current.LocalSettings;
                return (string)roaming.Values["Password"];
            }
            set
            {
                ApplicationDataContainer roaming = ApplicationData.Current.LocalSettings;
                roaming.Values["Password"] = value;
            }
        }
    }

    public class MItem
    {
        public MItem(Envelope e)
        {
            Subject = e.Subject != null ? e.Subject : "";
            MsgID = e.MessageId != null ? e.MessageId : "";
        }
        public string Subject { get; set; }
        public string MsgID { get; set; }
    }
}
